Telegram Group & Telegram Channel
Если вы импортируете модуль, который уже был импортирован, ничего не произойдёт, так как Python отслеживает, какие модули уже были загружены. Все такие модули помещаются в словарь sys.modules:


In : import sys
In : 'sys' in sys.modules.keys()
Out: True


Если вам действительно нужно перезагрузить модуль, следует использовать функцию importlib.reload(m). Здесь m — это объект модуля, который был успешно импортирован ранее, а не строка с его именем:


In : import importlib
In : importlib.reload(importlib)
Out[5]: <module 'importlib' from '/home/bookpython/.ve/pythonetc/lib/python3.6/importlib/__init__.py'>


👉@BookPython



tg-me.com/BookPython/3656
Create:
Last Update:

Если вы импортируете модуль, который уже был импортирован, ничего не произойдёт, так как Python отслеживает, какие модули уже были загружены. Все такие модули помещаются в словарь sys.modules:


In : import sys
In : 'sys' in sys.modules.keys()
Out: True


Если вам действительно нужно перезагрузить модуль, следует использовать функцию importlib.reload(m). Здесь m — это объект модуля, который был успешно импортирован ранее, а не строка с его именем:


In : import importlib
In : importlib.reload(importlib)
Out[5]: <module 'importlib' from '/home/bookpython/.ve/pythonetc/lib/python3.6/importlib/__init__.py'>


👉@BookPython

BY Библиотека Python разработчика | Книги по питону


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/BookPython/3656

View MORE
Open in Telegram


Библиотека Python разработчика | Книги по питону Telegram | DID YOU KNOW?

Date: |

For some time, Mr. Durov and a few dozen staffers had no fixed headquarters, but rather traveled the world, setting up shop in one city after another, he told the Journal in 2016. The company now has its operational base in Dubai, though it says it doesn’t keep servers there.Mr. Durov maintains a yearslong friendship from his VK days with actor and tech investor Jared Leto, with whom he shares an ascetic lifestyle that eschews meat and alcohol.

Telegram has exploded as a hub for cybercriminals looking to buy, sell and share stolen data and hacking tools, new research shows, as the messaging app emerges as an alternative to the dark web.An investigation by cyber intelligence group Cyberint, together with the Financial Times, found a ballooning network of hackers sharing data leaks on the popular messaging platform, sometimes in channels with tens of thousands of subscribers, lured by its ease of use and light-touch moderation.Библиотека Python разработчика | Книги по питону from cn


Telegram Библиотека Python разработчика | Книги по питону
FROM USA